package cn.com.Kol.ITPMP.TenMajorAreas.model;

import cn.com.Kol.ITPMP.System.Area;
import cn.com.Kol.ITPMP.System.Document;
import cn.com.Kol.ITPMP.System.Output;
import cn.com.Kol.ITPMP.System.Process;

import java.util.List;

import static cn.com.Kol.ITPMP.System.Constants.*;


/**
 * 整理管理
 * */
public class IntegrationManagement extends Area {

    private Process MakeProjectCharter = new Process(MAKE_PROJECT_CHARTER);
    private Process MakeProjectManagementPlan = new Process(MAKE_PROJECT_MANAGEMENT_PLAN);
    private Process GuideAndManageProject = new Process(GUIDE_AND_MANAGE_PROJECT);
    private Process MonitorAndControlProjectWork = new Process(MONITOR_AND_CONTROL_PROJECT_WORK);
    private Process PerformIntegratedChangeControl = new Process(INTEGRATED_CHANGE_CONTROL);
    private Process ProjectClosure = new Process(PROJECT_CLOSURE);

    public void IntegrationManagementProcess(){
        CreateProcess(MakeProjectCharter);
        CreateProcess(MakeProjectManagementPlan);
        CreateProcess(GuideAndManageProject);
        CreateProcess(MonitorAndControlProjectWork);
        CreateProcess(PerformIntegratedChangeControl);
        CreateProcess(ProjectClosure);

    }

    public void SetInputs(Process process){
        switch (process.getProcessName()){
            case "制定项目章程":
                process.inputs(STATEMENT_OF_WORK);
                process.inputs(COMMERCIAL_DEMONSTRATION);
                process.inputs(PROTOCOL);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "制定项目管理计划":
                process.inputs(PROJECT_CHARTER);
                process.inputs(OTHERS_OUTPUT);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "指导与管理项目工作":
                process.inputs(PROJECT_MANAGEMENT_PLAN);
                process.inputs(APPROVED_CHANGE_REQUESTS);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "监控项目工作":
                process.inputs(PROJECT_MANAGEMENT_PLAN);
                process.inputs(SCHEDULE_PREDICTION);
                process.inputs(COST_PREDICTION);
                process.inputs(CONFIRMED_CHANGES);
                process.inputs(WORK_PERFORMANCE_INFO);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                break;
            case "实施整体变更控制":
                process.inputs(PROJECT_MANAGEMENT_PLAN);
                process.inputs(WORK_PERFORMANCE_REPORT);
                process.inputs(CHANGE_REQUESTS);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "项目收尾":
                process.inputs(PROJECT_MANAGEMENT_PLAN);
                process.inputs(ACCEPTABLE_DELIVERABLES);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
        }
    }

    public void UseToolAndTech(Process process){
        switch (process.getProcessName()){
            case "制定项目章程":
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(FACILITATION);
                break;
            case "制定项目管理计划":
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(FACILITATION);
                break;
            case "指导与管理项目工作":
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(PROJECT_MANAGEMENT_INFORMATION_SYSTEM);
                process.useToolAndTech(CONFERENCE);
                break;
            case "监控项目工作":
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(ANALYSIS_TECHNICS);
                process.useToolAndTech(PROJECT_MANAGEMENT_INFORMATION_SYSTEM);
                process.useToolAndTech(CONFERENCE);
                break;
            case "实施整体变更控制":
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(CONFERENCE);
                process.useToolAndTech(CHANGE_CONTROL_TOOL);
                break;
            case "项目收尾":
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(ANALYSIS_TECHNICS);
                process.useToolAndTech(CONFERENCE);

        }
    }

    public void SetOutputs(Process process){
        switch (process.getProcessName()){
            case "制定项目章程":
                process.outputs(PROJECT_CHARTER);
                break;
            case "制定项目管理计划":
                process.outputs(PROJECT_MANAGEMENT_PLAN);
                break;
            case "指导与管理项目工作":
                process.outputs(DELIVERABLE);
                process.outputs(WORK_PERFORMANCE_DATA);
                process.outputs(CHANGE_REQUESTS);
                process.outputs(PROJECT_MANAGEMENT_PLAN_UPDATE);
                process.outputs(PROJECT_FILE_UPDATE);
                break;
            case "监控项目工作":
                process.outputs(CHANGE_REQUESTS);
                process.outputs(WORK_PERFORMANCE_REPORT);
                process.outputs(PROJECT_MANAGEMENT_PLAN_UPDATE);
                process.outputs(PROJECT_FILE_UPDATE);
                break;
            case "实施整体变更控制":
                process.outputs(APPROVED_CHANGE_REQUESTS);
                process.outputs(CHANGE_LOG);
                process.outputs(PROJECT_MANAGEMENT_PLAN_UPDATE);
                process.outputs(PROJECT_FILE_UPDATE);
                break;
            case "项目收尾":
                process.outputs(FINISHED_PRODUCT);
                process.outputs(ORGANIZATIONAL_PROCESS_ASSETS_UPDATE);


        }

    }




}
